cd ~/workspace/sve-proj/mat-script/

time = dlmread('time.csv'); 
a = [1:length(time)];
plot(a', time(:,1));
xlabel ("No. iterations");
ylabel ("time (MS)");
print -deps 'robot_time.pdf' 

plot(a', time(:,2));
xlabel ("No. iterations");
ylabel ("No nodes");
print -deps 'robot_space.pdf' 

a = dlmread('tracker_joint_xy_x7.csv'); 
%a = dlmread('x.csv');
x = a(:,1);
y = a(:,2);
z = dlmread('tracker_joint_z_x7.csv'); 
z = z .* (1./ max(max(z)));
mesh(x,y, z);
xlabel ('x7', 'FontSize',18);
ylabel ('o1');
zlabel('p(x7,o1)');

print -deps 'tracker_3d_x7o1.pdf' -color

pX = dlmread('tracker_px_x4.csv'); 
pX = pX(:,2);
pX = pX + .0000001*ones(size(pX));
z= z ./ pX;

mesh(x,y, z);
xlabel ("x4");
ylabel ("o1");
zlabel("p(x4|o1)");
print -deps 'tracker_3d_Cx4o1.pdf' -color

%time = dlmread('time.csv'); 
%a = [1:length(time)];
%plot(a', time(:,1));
%xlabel ("No. iterations");
%ylabel ("time (MS)");
%print -deps 'robot_time.pdf'
%
%

%
%tx = ty = linspace (-8, 8, 50)';
%[xx, yy] = meshgrid (tx, ty);
%r = sqrt (xx .^ 2 + yy .^ 2) + eps;
%tz = sin (r) ./ r;
%mesh (tx, ty, tz);